<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML>
<html>
  <head>
    
    <title>用户权限管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    	
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="../../css/manual.css">
	
  </head>
  
  <body>
  
  <table  width="100%"  border="0" cellpadding="0" cellspacing="0" height="100%">
  	<tr valign="top">
  	
  		<td height="100">
  			 <jsp:include page="/background/operator/head.jsp"></jsp:include>
  		</td>
  	</tr>
  	<tr valign="top">
  		<td>
  		
   
   
  <table width="100%"  border="0" cellpadding="0" cellspacing="0">
  
 <tr>
    	<td width="270" align="center">
    		
    	</td>
    	<td width="100%">

    	</td>
    </tr>
    
    <tr>
    	<td valign="top">
     		<div>
     		
     		</div>
					<s:include value="/background/operator/left.jsp"></s:include>		
     	</td>
     	
     	
     	<td valign="top" >
     	
     	<table width="100%" border="0" cellpadding="0" bgcolor="#e5f3ff" cellspacing="0" style= "border:1px solid #ffffff; border-top-color:#6cb1f1;">
     		<tr>
     			<td>基本资料</td>
     		</tr>
     	</table>
     	
     	<table align="center">
     		<tr>
     			<td><s:fielderror id="errormessage" /></td>
     		</tr>
     	</table>
     	
    <form id="modifyuserlimit" name="modifyuserlimited" onSubmit="return true;" action="modifylimitedflag_background.action" method="POST" >
    	
			<table  border="0" >
				<tr>
				  <td>
				  	<input type="hidden" id="email" name="email" value="<s:property value="operator.email_operator"/> " />
				  	<input type="hidden" id="limitjson" name="limitjson" />
				  	
					  <s:property value="operator.name_operator"/> 
					  <s:property value="operator.email_operator"/>
				  </td>
			  </tr> 
			</table>
	
	
	
		<table width="100%" border="0" cellpadding="0" bgcolor="#e5f3ff" cellspacing="0" style= "border:1px solid #ffffff; border-top-color:#6cb1f1;">
     		<tr>
     			<td>权限 </td>
     		</tr>
     	</table>
		
		<table>
			<s:iterator id="dictionaryMap" value="dictionaryMap">
				<tr>
				
					<td><s:property value="#dictionaryMap.value.dictionary_value"/></td>
					<td><s:property value="#dictionaryMap.value.dictionary_remark"/></td>
					<td><input name="limitFlag" type="checkbox" value="<s:property value="#dictionaryMap.value.dictionary_value"/>" <s:property value="limitFlag.get(#dictionaryMap.value.dictionary_value)"/>/></td>
					
					<td></td>
					
				</tr>
			</s:iterator>
		</table>
		<input type="button"" value="修改" onclick="limitValueToJSON()"/>
	</form> 
	</td>
</tr>

	
</table>
</td>
</tr>
<tr valign="bottom">
	<td>
		<jsp:include page="/manual/tail.jsp"></jsp:include>
	</td>
</tr>
</table>
<script type="text/javascript">


function limitValueToJSON(){


	var limitJSON = "{";


		checkbox_oj = modifyuserlimit["limitFlag"];

		 for(var i=0;i<checkbox_oj.length;i++) //循环
		   {
			 limitJSON += "'"+checkbox_oj[i].value + "':'" + checkbox_oj[i].checked+"'";
			   //alert(checkbox_oj[i].checked);
			 if((i+1)!=checkbox_oj.length){
				 limitJSON += ",";
			 }
		  
			}//*/
		limitJSON +="}";
		modifyuserlimit['limitjson'].value = limitJSON;
		modifyuserlimit.submit();
}

//alert(limitJSON);
/*
	var m = new Map();  

	<s:iterator id="limitFlag" value="limitFlag">
	
	m.put('<s:property value="#limitFlag.key"/>','<s:property value="#limitFlag.value"/>');
		 
		

	</s:iterator>
	
	

 	checkbox_oj = modifyForm["lable"];

 	 for(var i=0;i<checkbox_oj.length;i++) //循环
 	   {
 	   if(checkbox_oj[i].value=='<s:property value="release.release_lable"/>') //比较值
 	   { 
 	 	   	//alert(radio_oj[i].value);
 			checkbox_oj[i].checked=true; //修改选中状态
 	  	    break; //停止循环
 	   }
 	}//*/

</script>

  </body>

</html>
